//
//  SubjectCell.m
//  Double
//
//  Created by 袁庆秋 on 15/5/26.
//  Copyright (c) 2015年 袁庆秋. All rights reserved.
//

#import "SubjectCell.h"

@implementation SubjectCell

- (void)dealloc
{
    [_groundView release];
    [_showImage release];
    [_titleLabel release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.groundView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, [UIScreen mainScreen].bounds.size.width - 40, 180)];
        self.groundView.layer.cornerRadius = 10;
        self.groundView.clipsToBounds = YES;
        [self.contentView addSubview:self.groundView];
        [self.groundView release];
        
        self.showImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0,[UIScreen mainScreen].bounds.size.width - 20, 180)];
        [self.groundView addSubview:self.showImage];
        [self.showImage release];
        
        self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, self.showImage.frame.size.height - 20, [UIScreen mainScreen].bounds.size.width - 20, 20)];
        self.titleLabel.backgroundColor = [UIColor lightGrayColor];
        self.titleLabel.font = [UIFont systemFontOfSize:10];
        self.titleLabel.alpha = 0.8;
        [self.showImage addSubview:self.titleLabel];
        [self.titleLabel release];
    }
    return self;
}

@end
